package com.tmjavabasics.basics;

public class Parent {

	protected Integer counter = 0;
	
	public void change(int value){
		counter = value;
	}
	
	public void print() {
		System.out.println(counter.toString());
	}
	
	public static void toMaximal(Parent parent){
		if(parent == null)
			return;
		
		parent.change(Integer.MAX_VALUE);
		parent.print();		
	}
}
